package com.xctech.ipb.common.exception;

public enum AuthErrorCode implements ErrorCode {

    // 用户不存在, 未登录, 登录过期, 登录失效, 登录异常, 无权限
    USER_NOT_EXIST("USER_NOT_EXIST", "用户不存在"),
    USER_NOT_LOGIN("USER_NOT_LOGIN", "用户未登录"),
    USER_LOGIN_EXPIRED("USER_LOGIN_EXPIRED", "用户登录过期"),
    USER_LOGIN_INVALID("USER_LOGIN_INVALID", "用户登录失效"),
    USER_LOGIN_ERROR("USER_LOGIN_ERROR", "用户登录异常"),
    USER_NO_PERMISSION("USER_NO_PERMISSION", "用户无权限"),
    USER_LOGIN_FAILED("USER_LOGIN_FAILED", "用户登录失败");


    private String code;

    private String message;

    AuthErrorCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }
}
